<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
     .box {
        display: flex;
        width: 100%;
        height: 400px;
     }

     .left {
        width: 100px;
        background-color: antiquewhite;
        flex: none;
     }

     .right {
        flex: 1;
        background-color: aqua;

        /* overflow: auto; */
        min-width: 0;

     }

     .right-inner {
        width: 800px;
        background-color: red;
        height: 100%;

     }


    </style>
</head>
<body>

    <div class="box">
        <div class="left"></div>
        <div class="right">

            <div class="right-inner">
                正常情况下，我给了固定宽度，父元素flex:1不会小于我这个宽度，导致flex:1不会自动缩小
                解决：
                1. flex:1的元素设置overflw:auto、hidden
                2. 设置min-width:0
            </div>
        </div>
    </div>
    
</body>
</html>